home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / interapplication comm / 7edit / source / svtoken.h < prev   
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.9 KB  |  104 lines

  1. /*
  2.     File:        SVToken.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by: Original version by Jon Lansdell and Nigel Humphreys.
  7.                             3.1 updates by Greg Sutton.    
  8.  
  9.     Copyright:    Copyright ©1995-1999 by Apple Computer, Inc., All Rights Reserved.
  10.  
  11.                 You may incorporate this Apple sample source code into your program(s) without
  12.                 restriction. This Apple sample source code has been provided "AS IS" and the
  13.                 responsibility for its operation is yours. You are not permitted to redistribute
  14.                 this Apple sample source code as "Apple sample source code" after having made
  15.                 changes. If you're going to re-distribute the source, we require that you make
  16.                 it clear in the source that the code was descended from Apple sample source
  17.                 code, but that you've made changes.
  18.  
  19.     Change History (most recent first):
  20.                 7/19/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  21.                 
  22.  
  23. */
  24. #ifndef __SVTOKEN__
  25. #define __SVTOKEN__
  26.  
  27. #include <AppleEvents.h>
  28. #include <AEObjects.h>
  29. #include <AERegistry.h>
  30.  
  31. #include <Processes.h>
  32.  
  33. #define     pText            'TEXT'
  34.  
  35. //    Text Properties
  36.         
  37. #define     pLength            'leng'
  38. #define        pOffset            'ofse'
  39.         
  40. //    Window Properties - See the Registry for Details
  41.         
  42. #define     pPosition        'ppos'
  43. #define        pPageSetup        'PSET' // One of ours - Not in registry
  44. #define     pGXPageSetup    'TFGX' // One of ours - Not in registry
  45. //#define        pShowBorders    'PBOR' // Another of ours
  46.                 
  47. #define        typeTPrint        'TPNT' // A raw TPrint record - also one of ours
  48. #define     typeTGXPrint    'TPGX' // A raw flattened GX Job - also one of ours
  49.                         
  50. //    Error Codes
  51.         
  52. #define kAEGenericErr        -1799    // ???
  53.  
  54. //    Private AEObject definitions
  55.  
  56. #define typeMyAppl            'BAPP' // sig of my private token type for the app                 - AppToken
  57. #define typeMyWndw            'BWIN' // sig of my private token type for windows                 - windowToken
  58. #define typeMyText            'BTXT' // sig of my private token type for text                    - textToken
  59. #define typeMyTextProp       'BPRP' // sig of my private token type for text properties        - TextPropToken
  60. #define typeMyWindowProp     'WPRP' // sig of my private token type for window properties      - WindowPropToken
  61. #define typeMyApplProp        'APRP' // sig of my private token type for appl properties        - ApplPropToken
  62.  
  63. // These are entirely private to our app - used only when resolving the object specifier
  64.     
  65. typedef    ProcessSerialNumber AppToken;
  66.     
  67. struct ApplPropToken
  68. {
  69.     AppToken tokenApplToken;
  70.     DescType tokenApplProperty;
  71. };
  72. typedef struct ApplPropToken ApplPropToken;
  73.  
  74. struct WindowToken
  75. {
  76.     WindowPtr    tokenWindow;
  77. };
  78. typedef    struct WindowToken WindowToken;
  79.     
  80. struct WindowPropToken
  81. {
  82.     WindowToken tokenWindowToken;
  83.     DescType    tokenProperty;
  84. };
  85. typedef struct WindowPropToken WindowPropToken;
  86.     
  87. struct TextToken
  88. {
  89.     WindowPtr tokenWindow;
  90.     short     tokenOffset;
  91.     short     tokenLength;
  92. };
  93. typedef struct TextToken TextToken;
  94.  
  95. struct TextPropToken
  96. {
  97.     TextToken tokenTextToken;
  98.     DescType  tokenProperty;
  99. };
  100. typedef struct TextPropToken TextPropToken;                
  101.  
  102. #endif
  103.  
  104.